<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/tabs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/global.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>

<script type="text/javascript">
	var balance=${view.balance};
    function openLateFeeTotalDetail(){
        var url = "${ctx}/charge_cashieringAction.do?method=initLateFeeTotalDetail&accountId=${view.accountId}&balance="+balance;
	    top.windowOpen(url,"historyAccount","",445,860,true,"");
    }
   function openHistoryAccount(){
       var url = "${ctx}/charge_cashieringAction.do?method=initHistoryAccount&keyword=${view.houseId}";
		top.windowOpen(url,"historyAccount","${key.historyAccount}",240,800,true,"historyAccount");
   }

   function addBankAccount(){
    var url = "${ctx}/charge_cashieringAction.do?method=initAddBankAccount&keyword=${view.houseId}&proRightId=${view.proRightId}";
		top.windowOpen(url,"addBankAccount","${key.addbank}",260,450,true,"addBankAccount");
    }

    function editBankAccount(){
    var url = "${ctx}/charge_cashieringAction.do?method=initEditBankAccount&keyword=${view.houseId}&proRightId=${view.proRightId}";
		top.windowOpen(url,"editBankAccount","${key.accountChange}",500,500,true,"editBankAccount");
    }

    function deleteBankAccount(){
   AskConfirm("${key.deleteInfo}","cashieringList","${ctx}/charge_cashieringAction.do?method=deleteBankAccount&bankAccountId=${view.bankAccountId}&accNumber=${view.accNumber}");
    }

    function refresh(){
    var param="&keyword=${view.houseId}&proRightId=${view.proRightId}&accountId=${view.accountId}";
    window.location.href="${ctx}/charge_cashieringAction.do?method=getHouseChargeMessage"+param;

    }

    function isShowButtom(){
    if("${view.isHistory}"=='1'){

    return false;
    }
     if("${link}"=='true'){
     return false;
    }
    return true;
   }

   function reSetBalanceValue(balanceValue){
	   balance = ForDight(balanceValue,2);
   document.getElementById("td_balance_red").innerHTML="<font color='red'>"+ForDight(balanceValue,2)+"&nbsp;${key.yuan}</font>";
   }

   function reSetDepositValue(depositValue){

   document.getElementById("td_deposit_red").innerHTML=""+depositValue+"&nbsp;${key.yuan}";
   }

   function reSetPayBalanceValue(payBalanceValue){

   document.getElementById("td_payBalance_red").innerHTML=""+payBalanceValue+"&nbsp;${key.yuan}";
   }

   function reSetLateFeeValue(lateFeeValue){

   	document.getElementById("td_lateFee_red").innerHTML=""+ForDight(lateFeeValue,2)+"&nbsp;${key.yuan}";
   	if(lateFeeValue == 0.00){
   		document.getElementById("latefeetableId").style.display="none";
   	}else{
   		document.getElementById("latefeetableId").style.display="";
   	}
   }
   function   ForDight(Dight,How)
   {
        Dight = Math.round(Dight*Math.pow(10,How))/Math.pow(10,How);
        return Dight;
   }
   function reSetPrincipalValue(blanceValue,lateFeeValue){
	   var v= ForDight(blanceValue-lateFeeValue,2);
	   document.getElementById("td_principal_red").innerHTML=""+v+"&nbsp;${key.yuan}";
   }

    function getHouseNumber(){
   return "${view.houseNumber}";
   }

   function getOwnerName(){
    return "${view.participantName}";
   }

   function getHouseTitle(){
   return "${view.isVirtual=='0'?key.houseNumber:key.manageNumber}";
   }
   function init(){
   		<c:if test="${1 eq view.hasHistoryBankAccount}">
   			var aobj = "<a href='javaScript:openAccMore();' style=''>";
   			aobj += "<font color='blue'>"
			<c:choose>
				<c:when test="${not empty view.accNumber }">
					aobj += "更多";
				</c:when>
				<c:when test="${empty view.accNumber}">
					aobj += "历史帐号";
				</c:when>
			</c:choose>
			aobj += "</font>"
			aobj += "</a>"
			document.getElementById("moreAccNumber").innerHTML = aobj;
   		</c:if>
   }

   function openAccMore(){
   		var url = "${ctx}/charge_cashieringAction.do?method=initHistoryBankAccount&houseId=${view.houseId}&proRightId=${view.proRightId}"
		top.windowOpen(url,"addBankAccount","银行帐户信息",275,480,true,"bankAccountFrame");
   }

</script>
</head>
<body onload="init();">


<c:if test="${link}">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2" class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"> <span class="window_head_intext">${key.houseDetailMessage}</span></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td border="0" cellspacing="0" cellpadding="0" class="content">
<table width="100%" border="0" cellpadding="0" cellspacing="1" >
  <tr>
    <td>


	  <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
</table>
</c:if>

<c:if test="${!link}">
<c:if test="${showButtomType!=null}">
<script type="text/javascript">

 parent.showMenu('${showButtomType}','${view.bankAccountId}');
</script>
</c:if>
</c:if>

	  <table width="100%" border="0" cellpadding="5" cellspacing="1" class="aux_intable_color">
        <tr>
          <td width="12%" bgcolor="#F2F5F8">&nbsp;${view.isVirtual=='0'?key.houseNumber:key.manageNumber}</td>
          <td width="17%" bgcolor="#FFFFFF">${view.houseNumber}</td>
          <td width="12%" bgcolor="#F2F5F8">${key.balence}</td>
          <td width="17%" bgcolor="#FFFFFF" id="td_balance_red"><font color="red"><fmt:formatNumber pattern="###,##0.00" value="${view.balance}"/>&nbsp;${key.yuan}</font></td>
          <td width="12%" bgcolor="#F2F5F8">${key.preFee}</td>
          <td width="17%" bgcolor="#FFFFFF" id="td_payBalance_red"><fmt:formatNumber pattern="###,##0.00" value="${view.prePayBalance}"/>&nbsp;${key.yuan}</td>
        </tr>
        <tr>
          <td width="12%" bgcolor="#F2F5F8">${key.ownerName}</td>
          <td width="17%" bgcolor="#FFFFFF">${view.participantName}</td>
          <td width="12%" bgcolor="#F2F5F8">${key.principal}</td>
          <td width="17%" bgcolor="#FFFFFF" id="td_principal_red"><fmt:formatNumber pattern="###,##0.00" value="${view.principal}"/>&nbsp;${key.yuan}</td>
          <td width="12%" bgcolor="#F2F5F8">${key.sureBalence}</td>
          <td width="17%" bgcolor="#FFFFFF" id="td_deposit_red"><fmt:formatNumber pattern="###,##0.00" value="${view.deposit}"/>&nbsp;${key.yuan}</td>
        </tr>
        <tr>
          <td width="12%" bgcolor="#F2F5F8">${key.phone}</td>
          <td width="17%" bgcolor="#FFFFFF">${view.telephone}</td>
          <td width="12%" bgcolor="#F2F5F8">${key.lateFee}</td>
          <td width="17%" bgcolor="#FFFFFF" >
          <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td id="td_lateFee_red"><fmt:formatNumber pattern="###,##0.00" value="${view.latefee}"/>&nbsp;${key.yuan}</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td >
                  <c:if test="${view.latefee gt 0.00}">
                  <table border="0" cellpadding="0" cellspacing="0" id="latefeetableId">
                      <tr>
                        <td class="buttonOffLeft" id="btn1_881"></td>
                        <td class="buttonOffMiddle" id="btn1_882" onMouseOver="btn_change_over(88)" onMouseOut="btn_change_out(88)" onblur="btn_change(55)"><a href="#" onFocus="this.blur()" onClick="openLateFeeTotalDetail();return false;" style="color:#000;"><img src="${ctx}/images/chareg_ysjs_cs.gif" border="0" align="absbottom"/>明细</a></td>
                        <td class="buttonOffRight" id="btn1_883"></td>
                      </tr>
                  </table>
                  </c:if>
                  </td>
                </tr>
              </table>
            </td>
          <td width="12%" bgcolor="#F2F5F8">${key.bankNumber}/${key.accOwner}</td>
          <td width="17%" bgcolor="#FFFFFF">
          	<table width="100%" style="width:100%;table-layout:fixed">
          		<tr>
          			<td width="70%" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap" title="${view.accNumber}/${view.accOwner}">${view.accNumber}/${view.accOwner}</td>
          			<td width="30%" align="right"><span id="moreAccNumber"></span></td>
          		</tr>
          	</table>
          </td>
        </tr>
      </table>
<pms:tabPanel panelId="con_tabPanel"
            iframeId="connTabPanel"
            defaultHeight="300px"
            barWidthLeft="80%"
            barWidthRight="20%"
            hasTop="false">
  <pms:AuthTag authName="charge_cashieringAction.do?method=initChargeDetailMain">
     <pms:tab tabId="chargeDetail"
        caption="${key.feeDetail}"
        baseUrl="${ctx}/charge_cashieringAction.do?method=initChargeDetailMain&houseId=${view.houseId}&isVirtual=${view.isVirtual}&accountId=${view.accountId}&proRightId=${view.proRightId}&chargeSelect=${view.chargeSelect}&isShowButtom=:isShowButtom()"
        jsParam="isShowButtom()"/>
 </pms:AuthTag>
 <pms:AuthTag authName="charge_cashieringAction.do?method=initDataRegisterMain">
     <pms:tab tabId="dataEnter"
        caption="${key.enterData}"
        baseUrl="${ctx}/charge_cashieringAction.do?method=initDataRegisterMain&keyword=${view.houseId}&isVirtual=${view.isVirtual}&proRightId=${view.proRightId}"/>
</pms:AuthTag>
<pms:AuthTag authName="charge_cashieringAction.do?method=initRequisitionMain">
     <pms:tab tabId="chargeNote"
        caption="${key.note}"
        baseUrl="${ctx}/charge_cashieringAction.do?method=initRequisitionMain&keyword=${view.houseId}&isVirtual=${view.isVirtual}&proRightId=${view.proRightId}&isShowButtom=:isShowButtom()"
        jsParam="isShowButtom()"/>
</pms:AuthTag>
<pms:AuthTag authName="charge_cashieringAction.do?method=cashieringPrepayList">
     <pms:tab tabId="preCharge"
        caption="${key.prepare}"
        baseUrl="${ctx}/charge_cashieringAction.do?method=cashieringPrepayList&accountId=${view.accountId}&proRightId=${view.proRightId}&isVirtual=${view.isVirtual}&keyword=${view.houseId}&chargeSelect=${view.chargeSelect}&isShowButtom=:isShowButtom()"
        jsParam="isShowButtom()"/>
</pms:AuthTag>
<pms:AuthTag authName="charge_cashieringAction.do?method=cashieringDepositMain">
<pms:tab tabId="depositCharge"
        caption="${key.depositCharge}"
        baseUrl="${ctx}/charge_cashieringAction.do?method=cashieringDepositMain&accountId=${view.accountId}&proRightId=${view.proRightId}&isVirtual=${view.isVirtual}&keyword=${view.houseId}&chargeSelect=${view.chargeSelect}&isShowButtom=:isShowButtom()"
        jsParam="isShowButtom()"/>
</pms:AuthTag>
<pms:AuthTag authName="customer_ownerAction.do?method=getOwnerList">
     <pms:tab tabId="ownerMessage"
        caption="${key.ownerMessage}"
        baseUrl="${ctx}/customer_ownerAction.do?method=getOwnerList&keyword=${view.houseId}&proRightId=${view.proRightId}"/>
</pms:AuthTag>
</pms:tabPanel>
<c:if test="${link}">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="window_footer">
		<table border="0" align="right" cellpadding="0" cellspacing="0">
			<tr>
				<td class="btn_between_space"></td>
				<td>
				<table border="0" cellpadding="0" cellspacing="0"
					onClick="windowClose();">
					<tr>
						<td class="buttonOffLeft" id="btn1_31"></td>
						<td class="buttonOffMiddle" id="btn1_32" onblur="btn_change(3)"
							onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)"><img
							src="${ctx}/images/ico_cancel.gif" border="0" align="absmiddle" /> ${key.close}</td>
						<td class="buttonOffRight" id="btn1_33"></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</c:if>


</body>
</html>